home *** CD-ROM | disk | FTP | other *** search
- #include "../CGVPMacro.csi"
-
- PS20Only
-
- MainInput { uniform sampler2D shadMap0 : register(s0),
- uniform sampler2D baseMap : register(s1),
- uniform float4 Ambient,
- uniform float4 Fading }
- DeclarationsScript
- {
- OUT_T0_T1_T2
- FOUT
- }
- CoreScript
- {
- // load the decal
- float4 decalColor = tex2D(baseMap, IN.Tex1.xy);
- // load the 1 shadow sample
- float4 shadColor0 = tex2Dproj(shadMap0, IN.Tex0.xyzw);
- float shad = shadColor0.r/8 + shadColor0.g;
- float fZ = IN.Tex2.x / IN.Tex2.y;
- shad = shad - fZ;
- float fCompare = step(shad, 0.0);
- fCompare = fCompare * shadColor0.a * Fading.x;
-
- float3 color = decalColor.xyz * Ambient.xyz;
- OUT.Color.xyz = color.xyz;
- OUT.Color.a = fCompare;
- }
-
-